home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / TextServices.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  18.3 KB  |  643 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextServices.a
  3. ;
  4. ;    Contains:    Text Services Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8.2
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1991-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  18. __TEXTSERVICES__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  24.     include 'MacTypes.a'
  25.     ENDIF
  26.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  27.     include 'Events.a'
  28.     ENDIF
  29.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  30.     include 'Menus.a'
  31.     ENDIF
  32.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  33.     include 'AEDataModel.a'
  34.     ENDIF
  35.     IF &TYPE('__AEREGISTRY__') = 'UNDEFINED' THEN
  36.     include 'AERegistry.a'
  37.     ENDIF
  38.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  39.     include 'Components.a'
  40.     ENDIF
  41.  
  42.  
  43. kTextService                    EQU        'tsvc'                ; component type for the component description 
  44. kInputMethodService                EQU        'inpm'                ; component subtype for the component description 
  45. kTSMVersion                        EQU        $0150                ; Version of the Text Services Manager is 1.5 
  46.  
  47. kUnicodeDocument                EQU        'udoc'                ; TSM Document type for Unicode-savvy application 
  48. kUnicodeTextService                EQU        'utsv'                ; Component type for Unicode Text Service 
  49. ;  Language and Script constants
  50.  
  51. kUnknownLanguage                EQU        $FFFF
  52. kUnknownScript                    EQU        $FFFF
  53. kNeutralScript                    EQU        $FFFF
  54.  
  55.  
  56.                                                             ; Component Flags in ComponentDescription 
  57. bTakeActiveEvent                EQU        15                    ; bit set if the component takes active event 
  58. bHandleAERecording                EQU        16                    ; bit set if the component takes care of recording Apple Events <new in vers2.0> 
  59. bScriptMask                        EQU        $00007F00            ; bit 8 - 14 
  60. bLanguageMask                    EQU        $000000FF            ; bit 0 - 7  
  61. bScriptLanguageMask                EQU        $00007FFF            ; bit 0 - 14  
  62.  
  63.                                                             ; Typing method property constants for Input Methods 
  64. kIMJaTypingMethodProperty        EQU        'jtyp'                ; Typing method property for Japanese input methods
  65. kIMJaTypingMethodRoman            EQU        'roma'                ; Roman typing
  66. kIMJaTypingMethodKana            EQU        'kana'                ; Kana typing
  67.  
  68.                                                             ; Low level routines which are dispatched directly to the Component Manager 
  69. kCMGetScriptLangSupport            EQU        $0001                ; Component Manager call selector 1 
  70. kCMInitiateTextService            EQU        $0002                ; Component Manager call selector 2 
  71. kCMTerminateTextService            EQU        $0003                ; Component Manager call selector 3 
  72. kCMActivateTextService            EQU        $0004                ; Component Manager call selector 4 
  73. kCMDeactivateTextService        EQU        $0005                ; Component Manager call selector 5 
  74. kCMTextServiceEvent                EQU        $0006                ; Component Manager call selector 6 
  75. kCMGetTextServiceMenu            EQU        $0007                ; Component Manager call selector 7 
  76. kCMTextServiceMenuSelect        EQU        $0008                ; Component Manager call selector 8 
  77. kCMFixTextService                EQU        $0009                ; Component Manager call selector 9 
  78. kCMSetTextServiceCursor            EQU        $000A                ; Component Manager call selector 10 
  79. kCMHidePaletteWindows            EQU        $000B                ; Component Manager call selector 11 
  80. kCMGetTextServiceProperty        EQU        $000C                ; Component Manager call selector 12 
  81. kCMSetTextServiceProperty        EQU        $000D                ; Component Manager call selector 13 
  82.  
  83.                                                             ; New low level routines which are dispatched directly to the Component Manager 
  84. kCMUCTextServiceEvent            EQU        $000E                ; Component Manager call selector 14 
  85.  
  86.  
  87. ;  New opaque definitions for types 
  88.  
  89.  
  90. InterfaceTypeList        RECORD 0
  91. elements                 ds.l    1
  92. sizeof                     EQU *                    ; size:   $4 (4)
  93.                         ENDR
  94.  
  95.  
  96.  
  97. ;  Text Service Info List 
  98. TextServiceInfo            RECORD 0
  99. fComponent                 ds.l    1                ; offset: $0 (0)
  100. fItemName                 ds        Str255            ; offset: $4 (4)
  101. sizeof                     EQU *                    ; size:   $104 (260)
  102.                         ENDR
  103. ; typedef struct TextServiceInfo *        TextServiceInfoPtr
  104.  
  105. TextServiceList            RECORD 0
  106. fTextServiceCount         ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fServices' array 
  107. fServices                 ds        TextServiceInfo ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'TextServiceInfo' records follows 
  108. sizeof                     EQU *                    ; size:   $106 (262)
  109.                         ENDR
  110. ; typedef struct TextServiceList *        TextServiceListPtr
  111.  
  112. ; typedef TextServiceListPtr *            TextServiceListHandle
  113.  
  114. ScriptLanguageRecord    RECORD 0
  115. fScript                     ds.w    1                ; offset: $0 (0)
  116. fLanguage                 ds.w    1                ; offset: $2 (2)
  117. sizeof                     EQU *                    ; size:   $4 (4)
  118.                         ENDR
  119. ScriptLanguageSupport    RECORD 0
  120. fScriptLanguageCount     ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fScriptLanguageArray' array 
  121. fScriptLanguageArray     ds        ScriptLanguageRecord ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'ScriptLanguageRecord' records follows 
  122. sizeof                     EQU *                    ; size:   $6 (6)
  123.                         ENDR
  124. ; typedef struct ScriptLanguageSupport * ScriptLanguageSupportPtr
  125.  
  126. ; typedef ScriptLanguageSupportPtr *    ScriptLanguageSupportHandle
  127.  
  128. ;  High level TSM Doucment routines 
  129. ;
  130. ; pascal OSErr NewTSMDocument(short numOfInterface, InterfaceTypeList supportedInterfaceTypes, TSMDocumentID *idocID, long refcon)
  131. ;
  132.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  133.         Macro
  134.         _NewTSMDocument
  135.             moveq               #0,D0
  136.             dc.w                $AA54
  137.         EndM
  138.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  139.         IMPORT_CFM_FUNCTION NewTSMDocument
  140.     ENDIF
  141.  
  142. ;
  143. ; pascal OSErr DeleteTSMDocument(TSMDocumentID idocID)
  144. ;
  145.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  146.         Macro
  147.         _DeleteTSMDocument
  148.             moveq               #1,D0
  149.             dc.w                $AA54
  150.         EndM
  151.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  152.         IMPORT_CFM_FUNCTION DeleteTSMDocument
  153.     ENDIF
  154.  
  155. ;
  156. ; pascal OSErr ActivateTSMDocument(TSMDocumentID idocID)
  157. ;
  158.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  159.         Macro
  160.         _ActivateTSMDocument
  161.             moveq               #2,D0
  162.             dc.w                $AA54
  163.         EndM
  164.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  165.         IMPORT_CFM_FUNCTION ActivateTSMDocument
  166.     ENDIF
  167.  
  168. ;
  169. ; pascal OSErr DeactivateTSMDocument(TSMDocumentID idocID)
  170. ;
  171.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  172.         Macro
  173.         _DeactivateTSMDocument
  174.             moveq               #3,D0
  175.             dc.w                $AA54
  176.         EndM
  177.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  178.         IMPORT_CFM_FUNCTION DeactivateTSMDocument
  179.     ENDIF
  180.  
  181. ;
  182. ; pascal Boolean SetTSMCursor(Point mousePos)
  183. ;
  184.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  185.         Macro
  186.         _SetTSMCursor
  187.             moveq               #6,D0
  188.             dc.w                $AA54
  189.         EndM
  190.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  191.         IMPORT_CFM_FUNCTION SetTSMCursor
  192.     ENDIF
  193.  
  194. ;
  195. ; pascal OSErr FixTSMDocument(TSMDocumentID idocID)
  196. ;
  197.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  198.         Macro
  199.         _FixTSMDocument
  200.             moveq               #7,D0
  201.             dc.w                $AA54
  202.         EndM
  203.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  204.         IMPORT_CFM_FUNCTION FixTSMDocument
  205.     ENDIF
  206.  
  207. ;  Utilities 
  208. ;
  209. ; pascal OSErr UseInputWindow(TSMDocumentID idocID, Boolean useWindow)
  210. ;
  211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  212.         Macro
  213.         _UseInputWindow
  214.             moveq               #16,D0
  215.             dc.w                $AA54
  216.         EndM
  217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  218.         IMPORT_CFM_FUNCTION UseInputWindow
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal Boolean TSMEvent(EventRecord *event)
  223. ;
  224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  225.         Macro
  226.         _TSMEvent
  227.             moveq               #4,D0
  228.             dc.w                $AA54
  229.         EndM
  230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION TSMEvent
  232.     ENDIF
  233.  
  234. ;
  235. ; pascal Boolean TSMMenuSelect(long menuResult)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  238.         Macro
  239.         _TSMMenuSelect
  240.             moveq               #5,D0
  241.             dc.w                $AA54
  242.         EndM
  243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  244.         IMPORT_CFM_FUNCTION TSMMenuSelect
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal OSErr InitTSMAwareApplication(void )
  249. ;
  250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  251.         Macro
  252.         _InitTSMAwareApplication
  253.             moveq               #20,D0
  254.             dc.w                $AA54
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION InitTSMAwareApplication
  258.     ENDIF
  259.  
  260. ;
  261. ; pascal OSErr CloseTSMAwareApplication(void )
  262. ;
  263.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  264.         Macro
  265.         _CloseTSMAwareApplication
  266.             moveq               #21,D0
  267.             dc.w                $AA54
  268.         EndM
  269.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  270.         IMPORT_CFM_FUNCTION CloseTSMAwareApplication
  271.     ENDIF
  272.  
  273. ;  Redundant Utilities 
  274. ;
  275. ; pascal OSErr SendAEFromTSMComponent(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
  276. ;
  277.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  278.         Macro
  279.         _SendAEFromTSMComponent
  280.             moveq               #11,D0
  281.             dc.w                $AA54
  282.         EndM
  283.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  284.         IMPORT_CFM_FUNCTION SendAEFromTSMComponent
  285.     ENDIF
  286.  
  287. ;
  288. ; pascal OSErr NewServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  289. ;
  290.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  291.         Macro
  292.         _NewServiceWindow
  293.             moveq               #17,D0
  294.             dc.w                $AA54
  295.         EndM
  296.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  297.         IMPORT_CFM_FUNCTION NewServiceWindow
  298.     ENDIF
  299.  
  300. ;
  301. ; pascal OSErr NewCServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  302. ;
  303.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  304.         Macro
  305.         _NewCServiceWindow
  306.             moveq               #26,D0
  307.             dc.w                $AA54
  308.         EndM
  309.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  310.         IMPORT_CFM_FUNCTION NewCServiceWindow
  311.     ENDIF
  312.  
  313. ;
  314. ; pascal OSErr CloseServiceWindow(WindowPtr window)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  317.         Macro
  318.         _CloseServiceWindow
  319.             moveq               #18,D0
  320.             dc.w                $AA54
  321.         EndM
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION CloseServiceWindow
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal OSErr GetFrontServiceWindow(WindowPtr *window)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         Macro
  331.         _GetFrontServiceWindow
  332.             moveq               #19,D0
  333.             dc.w                $AA54
  334.         EndM
  335.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION GetFrontServiceWindow
  337.     ENDIF
  338.  
  339. ;
  340. ; pascal short FindServiceWindow(Point thePoint, WindowPtr *theWindow)
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  343.         Macro
  344.         _FindServiceWindow
  345.             moveq               #23,D0
  346.             dc.w                $AA54
  347.         EndM
  348.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  349.         IMPORT_CFM_FUNCTION FindServiceWindow
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal OSErr SetDefaultInputMethod(Component ts, ScriptLanguageRecord *slRecordPtr)
  354. ;
  355.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  356.         Macro
  357.         _SetDefaultInputMethod
  358.             moveq               #12,D0
  359.             dc.w                $AA54
  360.         EndM
  361.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  362.         IMPORT_CFM_FUNCTION SetDefaultInputMethod
  363.     ENDIF
  364.  
  365. ;
  366. ; pascal OSErr GetDefaultInputMethod(Component *ts, ScriptLanguageRecord *slRecordPtr)
  367. ;
  368.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  369.         Macro
  370.         _GetDefaultInputMethod
  371.             moveq               #13,D0
  372.             dc.w                $AA54
  373.         EndM
  374.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION GetDefaultInputMethod
  376.     ENDIF
  377.  
  378. ;
  379. ; pascal OSErr SetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  382.         Macro
  383.         _SetTextServiceLanguage
  384.             moveq               #14,D0
  385.             dc.w                $AA54
  386.         EndM
  387.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION SetTextServiceLanguage
  389.     ENDIF
  390.  
  391. ;
  392. ; pascal OSErr GetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  395.         Macro
  396.         _GetTextServiceLanguage
  397.             moveq               #15,D0
  398.             dc.w                $AA54
  399.         EndM
  400.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION GetTextServiceLanguage
  402.     ENDIF
  403.  
  404. ;  Component Manager Interfaces to Input Methods 
  405. ;
  406. ; pascal ComponentResult GetScriptLanguageSupport(ComponentInstance ts, ScriptLanguageSupportHandle *scriptHdl)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         Macro
  410.         _GetScriptLanguageSupport
  411.             move.l              #$00040001,-(sp)
  412.             moveq               #0,D0
  413.             dc.w                $A82A
  414.         EndM
  415.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  416.         IMPORT_CFM_FUNCTION GetScriptLanguageSupport
  417.     ENDIF
  418.  
  419. ;
  420. ; pascal ComponentResult InitiateTextService(ComponentInstance ts)
  421. ;
  422.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  423.         Macro
  424.         _InitiateTextService
  425.             move.l              #$00000002,-(sp)
  426.             moveq               #0,D0
  427.             dc.w                $A82A
  428.         EndM
  429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  430.         IMPORT_CFM_FUNCTION InitiateTextService
  431.     ENDIF
  432.  
  433. ;
  434. ; pascal ComponentResult TerminateTextService(ComponentInstance ts)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  437.         Macro
  438.         _TerminateTextService
  439.             move.l              #$00000003,-(sp)
  440.             moveq               #0,D0
  441.             dc.w                $A82A
  442.         EndM
  443.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  444.         IMPORT_CFM_FUNCTION TerminateTextService
  445.     ENDIF
  446.  
  447. ;
  448. ; pascal ComponentResult ActivateTextService(ComponentInstance ts)
  449. ;
  450.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  451.         Macro
  452.         _ActivateTextService
  453.             move.l              #$00000004,-(sp)
  454.             moveq               #0,D0
  455.             dc.w                $A82A
  456.         EndM
  457.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  458.         IMPORT_CFM_FUNCTION ActivateTextService
  459.     ENDIF
  460.  
  461. ;
  462. ; pascal ComponentResult DeactivateTextService(ComponentInstance ts)
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  465.         Macro
  466.         _DeactivateTextService
  467.             move.l              #$00000005,-(sp)
  468.             moveq               #0,D0
  469.             dc.w                $A82A
  470.         EndM
  471.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  472.         IMPORT_CFM_FUNCTION DeactivateTextService
  473.     ENDIF
  474.  
  475. ;
  476. ; pascal ComponentResult TextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event)
  477. ;
  478.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  479.         Macro
  480.         _TextServiceEvent
  481.             move.l              #$00060006,-(sp)
  482.             moveq               #0,D0
  483.             dc.w                $A82A
  484.         EndM
  485.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  486.         IMPORT_CFM_FUNCTION TextServiceEvent
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal ComponentResult UCTextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event, UniChar unicodeString[2147483647], UniCharCount unicodeStrLength)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  493.         Macro
  494.         _UCTextServiceEvent
  495.             move.l              #$000E000E,-(sp)
  496.             moveq               #0,D0
  497.             dc.w                $A82A
  498.         EndM
  499.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION UCTextServiceEvent
  501.     ENDIF
  502.  
  503. ;
  504. ; pascal ComponentResult GetTextServiceMenu(ComponentInstance ts, MenuHandle *serviceMenu)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  507.         Macro
  508.         _GetTextServiceMenu
  509.             move.l              #$00040007,-(sp)
  510.             moveq               #0,D0
  511.             dc.w                $A82A
  512.         EndM
  513.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION GetTextServiceMenu
  515.     ENDIF
  516.  
  517. ;
  518. ; pascal ComponentResult TextServiceMenuSelect(ComponentInstance ts, MenuHandle serviceMenu, short item)
  519. ;
  520.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  521.         Macro
  522.         _TextServiceMenuSelect
  523.             move.l              #$00060008,-(sp)
  524.             moveq               #0,D0
  525.             dc.w                $A82A
  526.         EndM
  527.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION TextServiceMenuSelect
  529.     ENDIF
  530.  
  531. ;
  532. ; pascal ComponentResult FixTextService(ComponentInstance ts)
  533. ;
  534.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  535.         Macro
  536.         _FixTextService
  537.             move.l              #$00000009,-(sp)
  538.             moveq               #0,D0
  539.             dc.w                $A82A
  540.         EndM
  541.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  542.         IMPORT_CFM_FUNCTION FixTextService
  543.     ENDIF
  544.  
  545. ;
  546. ; pascal ComponentResult SetTextServiceCursor(ComponentInstance ts, Point mousePos)
  547. ;
  548.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  549.         Macro
  550.         _SetTextServiceCursor
  551.             move.l              #$0004000A,-(sp)
  552.             moveq               #0,D0
  553.             dc.w                $A82A
  554.         EndM
  555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION SetTextServiceCursor
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal ComponentResult HidePaletteWindows(ComponentInstance ts)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         Macro
  564.         _HidePaletteWindows
  565.             move.l              #$0000000B,-(sp)
  566.             moveq               #0,D0
  567.             dc.w                $A82A
  568.         EndM
  569.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  570.         IMPORT_CFM_FUNCTION HidePaletteWindows
  571.     ENDIF
  572.  
  573. ;
  574. ; pascal OSErr GetServiceList(short numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, long *seedValue)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  577.         Macro
  578.         _GetServiceList
  579.             moveq               #8,D0
  580.             dc.w                $AA54
  581.         EndM
  582.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION GetServiceList
  584.     ENDIF
  585.  
  586. ;
  587. ; pascal OSErr OpenTextService(TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         Macro
  591.         _OpenTextService
  592.             moveq               #9,D0
  593.             dc.w                $AA54
  594.         EndM
  595.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  596.         IMPORT_CFM_FUNCTION OpenTextService
  597.     ENDIF
  598.  
  599. ;
  600. ; pascal OSErr CloseTextService(TSMDocumentID idocID, ComponentInstance aComponentInstance)
  601. ;
  602.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  603.         Macro
  604.         _CloseTextService
  605.             moveq               #10,D0
  606.             dc.w                $AA54
  607.         EndM
  608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION CloseTextService
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal ComponentResult GetTextServiceProperty(ComponentInstance ts, OSType propertySelector, SInt32 *result)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  616.         Macro
  617.         _GetTextServiceProperty
  618.             move.l              #$0008000C,-(sp)
  619.             moveq               #0,D0
  620.             dc.w                $A82A
  621.         EndM
  622.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  623.         IMPORT_CFM_FUNCTION GetTextServiceProperty
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal ComponentResult SetTextServiceProperty(ComponentInstance ts, OSType propertySelector, SInt32 value)
  628. ;
  629.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  630.         Macro
  631.         _SetTextServiceProperty
  632.             move.l              #$0008000D,-(sp)
  633.             moveq               #0,D0
  634.             dc.w                $A82A
  635.         EndM
  636.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  637.         IMPORT_CFM_FUNCTION SetTextServiceProperty
  638.     ENDIF
  639.  
  640.  
  641.     ENDIF ; __TEXTSERVICES__ 
  642.  
  643.